package com.voicechat.firstmet.realm;

import java.util.List;

/**
 * @ProjectName: FirstMet
 * @Package: com.voicechat.firstmet.bean
 * @ClassName: GiftDataBean
 * @Description: 礼物列表数据，保存至数据库
 * @Author: ljp
 * @CreateDate: 2018/11/19 15:09
 * @Version: 1.0
 */
public class GiftDataBean<T> {


    /**
     * code : 200
     * msg : 成功
     * list : [{"id":"111","isNewRecord":false,"name":"游轮","gold":101,"imgUrl":"head/64121538037382.jpg","animationUrl":"head/64121538037382.jpg","version":1},{"id":"222","isNewRecord":false,"name":"跑车","gold":100,"imgUrl":"head/64121538037382.jpg","animationUrl":"head/64121538037382.jpg","version":1},{"id":"aaa","isNewRecord":false,"name":"大火箭","gold":300,"imgUrl":"head/64121538037382.jpg","animationUrl":"head/64121538037382.jpg","version":1},{"id":"bbb","isNewRecord":false,"name":"飞机","gold":201,"imgUrl":"head/64121538037382.jpg","animationUrl":"head/64121538037382.jpg","version":1},{"id":"ccc","isNewRecord":false,"name":"大炮","gold":200,"imgUrl":"head/64121538037382.jpg","animationUrl":"head/64121538037382.jpg","version":1}]
     * version : 1
     */
    private int code;
    private String msg;
    private String version;//礼物版本号，由此判断是否有礼物更新

    private List<T> list;
    /**
     * object : {"id":"asdi213jbjkb3450876jfdgjkk2j346i36q","isNewRecord":false,"remarks":"","title":"Android","content":"jinping","channel":"yy0000","sysVersion":"0.2","type":1}
     */

    private ObjectBean object;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public List<T> getList() {
        return list;
    }

    public void setList(List<T> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "GiftDataBean{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", version='" + version + '\'' +
                ", list=" + list +
                ", object=" + object +
                '}';
    }

    public ObjectBean getObject() {
        return object;
    }

    public void setObject(ObjectBean object) {
        this.object = object;
    }

    public static class ObjectBean {
        /**
         * id : asdi213jbjkb3450876jfdgjkk2j346i36q
         * isNewRecord : false
         * remarks :
         * title : Android
         * content : jinping
         * channel : yy0000
         * sysVersion : 0.2
         * type : 1
         */

        private String id;
        private boolean isNewRecord;
        private String remarks;
        private String title;//更新标题
        private String content;//更新内容
        private String channel;//
        private String sysVersion;//最小版本号，最大版本号
        private int type;//类型  是礼物还是apk更新
        private String downloadUrl;//下载链接

        public String getDownloadUrl() {
            return downloadUrl;
        }

        public void setDownloadUrl(String downloadUrl) {
            this.downloadUrl = downloadUrl;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public boolean isIsNewRecord() {
            return isNewRecord;
        }

        public void setIsNewRecord(boolean isNewRecord) {
            this.isNewRecord = isNewRecord;
        }

        public String getRemarks() {
            return remarks;
        }

        public void setRemarks(String remarks) {
            this.remarks = remarks;
        }

        public String getTitle() {
            return title;
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public String getContent() {
            return content;
        }

        public void setContent(String content) {
            this.content = content;
        }

        public String getChannel() {
            return channel;
        }

        public void setChannel(String channel) {
            this.channel = channel;
        }

        public String getSysVersion() {
            return sysVersion;
        }

        public void setSysVersion(String sysVersion) {
            this.sysVersion = sysVersion;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        @Override
        public String toString() {
            return "ObjectBean{" +
                    "id='" + id + '\'' +
                    ", isNewRecord=" + isNewRecord +
                    ", remarks='" + remarks + '\'' +
                    ", title='" + title + '\'' +
                    ", content='" + content + '\'' +
                    ", channel='" + channel + '\'' +
                    ", sysVersion='" + sysVersion + '\'' +
                    ", type=" + type +
                    '}';
        }
    }
}
